Skip to content

fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544

Merged
mnriem merged 4 commits into
github:mainfrom
WOLIKIMCHENG:fix/extension-skill-command-refs
Jul 16, 2026
Merged

fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544
mnriem merged 4 commits into
github:mainfrom
WOLIKIMCHENG:fix/extension-skill-command-refs

Conversation

@WOLIKIMCHENG

@WOLIKIMCHENG WOLIKIMCHENG commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Resolve explicit __SPECKIT_COMMAND_<NAME>__ tokens when extension commands are rendered into generated SKILL.md files.

This updates the extension skill-registration path to call IntegrationBase.resolve_command_refs(...) after resolve_skill_placeholders() and before integration-specific skill post-processing, matching the existing command-rendering pipeline.

Scope is limited to explicit __SPECKIT_COMMAND_*__ tokens for #3451 phase 2. It does not rewrite literal /speckit.foo.bar or speckit.foo.bar text.

Refs #3451

Testing

  • git diff --check
  • .venv/bin/python -m pytest tests/test_extension_skills.py -q
  • .venv/bin/python -m pytest tests/test_agent_config_consistency.py -k 'skills_agent_command_token_resolves_with_hyphen' -q

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves explicit command-reference tokens while generating extension skills.

Changes:

  • Resolves __SPECKIT_COMMAND_*__ tokens using the configured separator.
  • Tests token resolution and preservation of literal references.
Show a summary per file
File Description
src/specify_cli/extensions/__init__.py Adds token resolution to skill generation.
tests/test_extension_skills.py Adds regression tests for generated skill content.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/specify_cli/extensions/__init__.py Outdated
@mnriem

mnriem commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback. I would assume for those other integrations you will need to override the method that generates the actual content?

Resolve extension skill command-reference tokens with the active skill invocation style so Codex and ZCode use $speckit-* while slash-style agents keep their native forms. Preserve literal command-looking text.
@WOLIKIMCHENG

Copy link
Copy Markdown
Contributor Author

Addressed the feedback by making extension skill command-reference tokens render with the active agent invocation style, including $speckit-* for Codex/ZCode, while preserving literal text.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/specify_cli/extensions/__init__.py

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@mnriem
mnriem self-requested a review July 16, 2026 12:20
@mnriem
mnriem merged commit 4fed84a into github:main Jul 16, 2026
12 checks passed
mnriem added a commit to davidebibm/spec-kit that referenced this pull request Jul 16, 2026
…separators, extension-skill token resolution

Addresses PR review 4716036212 (3 comments):

1. Bob legacy-install regression: `use`/`switch`/`upgrade` on an existing
   Bob 1.x project (only `.bob/commands/` on disk, no stored
   `legacy_commands`) called `is_skills_mode(None)` -> True and rewrote
   `ai_skills=True`, silently switching extension/command-reference handling
   to the skills layout. `is_skills_mode` now takes an optional `project_root`;
   Bob preserves an already-installed legacy layout until an explicit upgrade
   creates `.bob/skills/`. A fresh project still defaults to skills.

2. Copilot dual-mode separator: `invoke_separator_for_mode` was inherited
   from the base (mode-independent) and returned Copilot's static `.`, so
   preset/extension command refs in a Copilot skills project rendered
   `/speckit.<name>` instead of `/speckit-<name>`. Override it on Copilot to
   track the persisted `ai_skills` state, consistent with
   `build_command_invocation` and `effective_invoke_separator`.

3. Bob extension-skill command-ref tokens: verified that merging main's
   generic `_resolve_command_ref_tokens` (github#3544) resolves Bob's tokens via
   the `CONDITIONAL_SLASH_AGENTS` path (`/speckit-<name>`); added Bob to the
   command-ref regression parametrize plus dedicated Bob use-path tests.

All tests pass (full suite green; merged with current main incl. github#3544).

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 63f93544-a77f-4f01-bf04-c88806a97dbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants